The iOS 5 Developer’s Cookbook: Core Concepts and Essential Recipes for iOS Programmers, Third Edition (Gal Zentner's Library) by Erica Sadun
Author:Erica Sadun
Language: eng
Format: epub
Publisher: Addison-Wesley
Published: 2012-06-14T16:00:00+00:00
Adding iPad Support
On the iPhone, you create a picker controller and present it modally. On the iPad, you embed a popover controller with your image picker. Because of this difference, you need to check for the runtime device when building universal applications. The following test produces a true value when run on an iPhone, false on an iPad:
#define IS_IPHONE \
(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
Use this test both when creating your picker and whenever you receive a media-picking delegate callback. On the iPhone, you will want to dismiss and release your modal controller during that callback. On the iPad, you need to wait until the popover is dismissed before allowing the picker to be released. Recipe 7-1 demonstrates how to create and present the proper picker interface depending on the device in use.
- (void)popoverControllerDidDismissPopover:
(UIPopoverController *)aPopoverController
{
popoverController = nil;
imagePickerController = nil;
}
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
The Mikado Method by Ola Ellnestam Daniel Brolund(22431)
Hello! Python by Anthony Briggs(21620)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(20183)
Dependency Injection in .NET by Mark Seemann(19563)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(19309)
Kotlin in Action by Dmitry Jemerov(19233)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(18772)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(17575)
Adobe Camera Raw For Digital Photographers Only by Rob Sheppard(16961)
Grails in Action by Glen Smith Peter Ledbrook(16726)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(14219)
Secrets of the JavaScript Ninja by John Resig & Bear Bibeault(12199)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(10922)
A Developer's Guide to Building Resilient Cloud Applications with Azure by Hamida Rebai Trabelsi(10594)
Jquery UI in Action : Master the concepts Of Jquery UI: A Step By Step Approach by ANMOL GOYAL(10028)
Hit Refresh by Satya Nadella(9111)
The Kubernetes Operator Framework Book by Michael Dame(8536)
Exploring Deepfakes by Bryan Lyon and Matt Tora(8361)
Robo-Advisor with Python by Aki Ranin(8305)